<template>
  <div>
    <h1>vip 2</h1>
  </div>
</template>

<script>
export default {
  // 路由组件守卫
  beforeRouteEnter(to, from, next) {
    console.log(to);
    console.log(from);
    console.log(next);
    next((component) => {
      console.log(component);
    });
    // console.log(this);
  },
  beforeRouteLeave(to, from, next) {
    console.log(to);
    console.log(from);
    next();
    console.log(this);
  },
  beforeRouteUpdate(to, from, next) {
    console.log(to);
    console.log(from);
    next();
  },
};
</script>

<style lang="scss" scoped>
</style>